//---------------------------------------------------------------------------

#ifndef FrameProviderOrderDlgH
#define FrameProviderOrderDlgH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <Buttons.hpp>
#include <ExtCtrls.hpp>

#include "DateUtilities.h"
#include "Error.h"
#include "FrameProviderBridge.h"
#include <ComCtrls.hpp>

//---------------------------------------------------------------------------
class TfrmFrameProviderOrderDlg : public TForm
{
__published:	// IDE-managed Components
        TPanel *pnlMain;
        TLabel *lblDate;
        TBitBtn *btnOk;
        TBitBtn *btnHelp;
        TBitBtn *btnCancel;
        TLabel *lblNumber;
        TEdit *edtNumber;
        TLabel *lblAmount;
        TEdit *edtAmount;
        TSpeedButton *btnDate;
        TEdit *edtDate;
        TLabel *lblCurrency;
        void __fastcall btnOKClick(TObject *Sender);
        void __fastcall btnDateClick(TObject *Sender);
        void __fastcall FormDestroy(TObject *Sender);
private:
        TFrameProviderBridge* bridge;
        TFrameOrder* original;
        TFrameOrder* order;
        __int64 frameProviderID;

        void ShowOrder();
        void GatherOrder();
        void AddNewOrder();
        void UpdateOrder();

        void ValidateData();
        void HandleError( TError * e);
public:
        __fastcall TfrmFrameProviderOrderDlg(TComponent* Owner, TFrameProviderBridge* bridge, TFrameOrder* order);
        __fastcall TfrmFrameProviderOrderDlg(TComponent* Owner, TFrameProviderBridge* bridge, __int64 frameProviderID);
};
//---------------------------------------------------------------------------
#endif
